@array = (1,2,3,4,5,6);

#使用 qw 运算符
@array = qw/This is an array/;

print($array,"\n");
print(@array,"\n");

@names = qw/daiqianying
lile
lizhuang
yangruimin/;

print @names,"\n";

print $names[0],"\n";

print $names[-1],"\n";

#使用范围运算符
@var_10 = (1..10);
print @var_10,"\n";

@testarray = (1..233);

print "array size:",scalar @testarray,"\n";


@array = (1,2,3);
$array[50] = 4;

$size = @array;
$max_index = $#array;

print "Size:  $size\n";
print "Max Index: $max_index\n";